<?php if (!defined('THINK_PATH')) exit();?><!--<meta http-equiv="refresh" content="1"/>-->
<link href="/Public/Admin/css/same.css"  type="text/css" rel="stylesheet"/>
<script src="/Public/js/jquery-1.11.3.min.js" type="text/javascript"></script>
<link href="/Public/css/bootstrap.css"  type="text/css" rel="stylesheet"/>
<script src="/Public/js/layer/layer.js" type="text/javascript"></script>
<script src="/Public/js/bootstrap.js" type="text/javascript"></script>
<script src="/Public/Admin/js/SystemManage.js" type="text/javascript"></script>
<div class="a-main-left-content">
    <div class="a_con_title">
        <h4>管理员管理</h4>
    </div>
    <div class="a_title_tip">
        <img class="a_record_icon" src="/Public/img/record_01.jpg"/>
        <span class="a_record_news">请勿泄露管理员的信息，如有泄露负法律责任。</span>
    </div>

    <div class="read_type_box">
        <div class="record_sousuo">
            <form action="<?php echo U('Admin/SystemManage/adminManage');?>" method="post">
                <span>管理员邮箱：</span>
                <input type="text" name="a_email">
                <span>管理员状态：</span>
                <select name="a_status">
                    <option value="">&nbsp;&nbsp;请选择</option>
                    <option value="1">&nbsp;&nbsp;准许</option>
                    <option value="2">&nbsp;&nbsp;禁用</option>
                </select>
                <div class="read_submit">
                    <img src="/Public/Admin/img/record_02.jpg" alt="搜索">
                    <input type="submit" value="查询" >
                    <button type="button" data-toggle="modal" data-target="#myModal">
                        添加
                    </button>
                </div>
            </form>
            <!-- Modal -->
            <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="myModalLabel">管理员信息添加</h4>
                        </div>
                        <div class="modal-body">
                            <div class="top_form_read">
                                <span>管理员名称：</span>
                                <input type="text" name="a_name" placeholder="&nbsp;管理员名称" id="a_name">
                            </div>
                            <div class="top_form_read">
                                <span> 管理员邮箱：</span>
                                <input type="email" name="a_email" placeholder="&nbsp;管理员邮箱" id="a_email">
                            </div>
                            <div class="top_form_read">
                                <span>管理员密码：</span>
                                <input type="text" name="a_pwd" placeholder="&nbsp;管理员密码" id="a_pwd">
                            </div>
                            <div class="top_form_read">
                                <span>重复输密码：</span>
                                <input type="text" name="a_repwd" placeholder="&nbsp;重复输密码" id="a_repwd">
                            </div>
                            <div class="top_form_read">
                                <span>管理员电话：</span>
                                <input type="tel" name="a_tel" placeholder="&nbsp;管理员电话" id="a_tel"  onkeyup="value=this.value.replace(/\D+/g,'')">
                            </div>
                            <div class="top_form_read">
                                <span>管理员部门：</span>
                                <input type="text" name="a_department" placeholder="&nbsp;管理员部门" id="a_department" value="运维管理部门" readonly="">
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                            <button type="button" class="btn btn-primary add" >添加</button>
                        </div>
                        <input type="hidden" value="<?php echo U('Admin/AdminAdd/adminAdd');?>" id="add-url">
                    </div>
                </div>
            </div>
            <!----->
        </div>
        <div class="read_type_table admin_left">
            <div class="table_span">
                <span>管理员信息</span>
            </div>
            <div class="height_con">
                <table class="table_read table_winth">
                    <tr >
                        <th>管理员名称</th>
                        <th>管理员邮箱</th>
                        <th>管理员电话</th>
                        <th>管理员部门</th>
                        <th>管理员状态</th>
                        <th>操作</th>
                    </tr>
                    <?php if(is_array($_getAdminCategoryInfo)): $i = 0; $__LIST__ = $_getAdminCategoryInfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if($vo['a_status'] == 1): ?><tr>
                                <td><?php echo ($vo['a_name']); ?></td>
                                <td><?php echo ($vo['a_email']); ?></td>
                                <td><?php echo ($vo['a_tel']); ?></td>
                                <td><?php echo ($vo['a_department']); ?></td>
                                <td class="status1"><?php echo ($vo['a_status']); ?></td>
                                <td>
                                    <a href="<?php echo U('Admin/SystemManage/adminInfoSaveTiao',array('a_id'=>$vo['a_id']));?>"> <button class=" wyz_bb">编辑</button></a>
                                    <button class="del_user wyz_dd1" data-del-url="<?php echo ($vo['a_id']); ?>">禁用</button>
                                </td>
                            </tr>
                            <?php else: ?>
                            <tr>
                                <td><?php echo ($vo['a_name']); ?></td>
                                <td><?php echo ($vo['a_email']); ?></td>
                                <td><?php echo ($vo['a_tel']); ?></td>
                                <td><?php echo ($vo['a_department']); ?></td>
                                <td class="status2"><?php echo ($vo['a_status']); ?></td>
                                <td>
                                    <a href="<?php echo U('Admin/SystemManage/adminInfoSaveTiao',array('a_id'=>$vo['a_id']));?>"> <button class=" wyz_bb">编辑</button></a>
                                    <button class="rec_user wyz_bb" data-rec-url="<?php echo ($vo['a_id']); ?>">准许</button>
                                </td>
                            </tr><?php endif; endforeach; endif; else: echo "" ;endif; ?>
                </table>
            </div>
            <input type="hidden" value="<?php echo U('Admin/SystemManage/adminTypeDel');?>" id="del-user-url">
            <input type="hidden" value="<?php echo U('Admin/SystemManage/adminTypeRec');?>" id="rec-user-url">
        </div>
    </div>
</div>
<script type="text/javascript">
    $(".status1").html("准许");
    $(".status2").html("禁用");
</script>